<!DOCTYPE html>
<html>
<head>
<title>商品表</title>
<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("pms:goodsinfo:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("pms:goodsinfo:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("pms:goodsinfo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品货号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.goodsNo" placeholder="商品货号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品类别</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.type" placeholder="商品类别"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.name" placeholder="商品名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">分类名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.categoryName" placeholder="分类名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品条形码</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.barcode" placeholder="商品条形码"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">图片地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.image" placeholder="图片地址"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品售价</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.price" placeholder="商品售价"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品原价</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.linePrice" placeholder="商品原价"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品单位</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.unit" placeholder="商品单位"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">排序</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.sort" placeholder="排序"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品描述</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.description" placeholder="商品描述"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品参数</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.commodityParam" placeholder="商品参数"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">上下状态(默认上架，0--上架，1--下架（仓库中），2--已售完)</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.shelfState" placeholder="上下状态(默认上架，0--上架，1--下架（仓库中），2--已售完)"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.createTime" placeholder="创建时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">更新时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.updateTime" placeholder="更新时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">1删除 0不删除</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodsInfo.deleteState" placeholder="1删除 0不删除"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/pms/goodsinfo.js?_${.now?long}"></script>
</body>
</html>